<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>声明（创建）数组</title>
</head>

<body>
    <h2>JavaScript 数组</h2>

    <p>数组索引基于零，这意味着第一个项目是 [0]，第二个项目是 [1]，以此类推。</p>

    <p id="demo"></p>
    <script>
        var cars =["Porsche","Volvo","BMW"];
        document.getElementById("demo").innerHTML =cars[0];
    </script>
</body>

</html>